-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial submission #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments for reviewers
@@ -1,3 +1,3 @@ | |||
[flake8] | |||
max-line-length = 125 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For gen AI apps, this length is too small, thus I've changed it this time
.pytype/ | ||
.idea/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for PyCharm users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't already have this in place in the main template, can we open a PR to update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are: slack-samples/bolt-python-starter-template#42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate you! 🙇🏼♀️
app.event("assistant_thread_started")(start_thread_with_suggested_prompts) | ||
app.event("assistant_thread_context_changed")(save_new_thread_context) | ||
app.event("message", matchers=[is_user_message_event_in_assistant_thread])(respond_to_user_message) | ||
app.event("message", matchers=[is_message_event_in_assistant_thread])(just_ack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other message events such as message_changed, message_deleted etc. are produced by an assistant thread's behavior. Just acknowledging them.
app.event("message", matchers=[is_message_event_in_assistant_thread])(just_ack) | ||
|
||
|
||
def is_message_event_in_assistant_thread(body: Dict[str, Any]) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These is_xxx methods will be unnecessary once bolt-python's full support is released: slackapi/bolt-python#1162
@@ -0,0 +1,62 @@ | |||
from typing import Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file will be unnecessary once bolt-python's full support is released: slackapi/bolt-python#1162
"scopes": { | ||
"bot": [ | ||
"assistant:write", | ||
"channels:join", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
channels:join, channels:history, groups:history are optional and they are necessary only for the channel summarization prompt pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for putting this together so quickly. 🙇🏼♀️
Since this isn't a true template (contains functionality and not just dummy text), have suggested changes to reflect that and make it a sample. Will also change the repository name to bolt-python-app-assistant
!
.pytype/ | ||
.idea/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't already have this in place in the main template, can we open a PR to update it?
Co-authored-by: Alissa Renz <[email protected]>
It's all set! Before we make this repo public (perhaps early next week), we can merge this PR. |
Co-authored-by: Alissa Renz <[email protected]>
Type of change (place an x in the [ ] that applies)
Summary
Describe the goal of this PR. Mention any related Issue numbers.
If you are introducing a new sample app in this pull request, please also include a detailed description of the application’s purpose and functionality.
Requirements (place an x in each [ ] that applies)